#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <ctime>

#include "DoorSensor.h"

DoorSensor* doorSensorConstruct()
{
	DoorSensor *sensor;
	sensor = (DoorSensor*) malloc(sizeof(DoorSensor));
	return sensor;
}

void doorSensorDeconstruct(DoorSensor *doorSensor)
{
	free(doorSensor);
}

int doorCanClose(DoorSensor *doorSensor)
{
	// This is where you would check of a person is standing in line with the door
	// using hardware, we are just going to use a random;

	srand(time(NULL));
	return rand() % 2;
}